<?php
namespace app\admin\controller\system;;
use app\common\controller\AdminController;
use EasyAdmin\annotation\ControllerAnnotation;
use EasyAdmin\annotation\NodeAnotation;
use app\admin\model\publicuse\PublicUse;
use think\App;
/**
 * @ControllerAnnotation(title="配置设置组")
 * Class Setconfiggroup
 */
class Setconfiggroup extends AdminController
{
    use \app\admin\traits\Curd;
     protected $allowModifyFields = [
        'status',
    ];
    protected $noExportFields = [
        'id',
        'name',
        'sort',
        'identification',
        'create_time',
        'update_time',
        'status',
        'delete_time',
    ];
    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->model = new \app\admin\model\SystemConfigGroup();
        $array = PublicUse::getConfigDir(__CLASS__);
        if(is_file(__DIR__.DIRECTORY_SEPARATOR.'field'.DIRECTORY_SEPARATOR.$array['class'].'.json')){
           $this->AllData = json_decode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'field'.DIRECTORY_SEPARATOR.$array['class'].'.json'),true);
        }
    }
}